//导入request.js工具
import request from '@/utils/request.js'
import { useTokenStore } from '../stores/token'
//提供调用登录接口
export const userLoginService=(LoginData)=>{
    const params=new URLSearchParams();
    for(let key in LoginData){
        params.append(key,LoginData[key]);
    }
    return request.post('/user/login',params);
}
//用户列表查询
export const userListService = (params) => {
     //获取token状态
     const tokenStore = useTokenStore()
    return request.get('/adm/userList', { params: params }, { headers: { 'Authorization': tokenStore.token } })
}